<%@page import="ee.graphicscard.controller.forms.GraphicsCardForm"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%> 
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Graafikakaart</title>
		<link rel="stylesheet" type="text/css" href = "static/css/vaheylesande_stylesheet.css"/>
		<script type="text/javascript" src="jquery-1.9.1.js"></script>
  		<script type="text/javascript" src="jsForGraphicsCardWebPages.js"></script>
		<style type='text/css'>
			textarea.inputTextArea
			{
				width:300px;
				height:300px;	
			}
		</style>
	</head>
	<body>

		<%@ include file="/ContainerAndMenu.jsp" %>
		
<!-- _____________________________CONTENT____________________________________________________________________________ -->
	    	<div class="column" id="content">
	    		<h1>Kirje vaatamine ja muutmine</h1>
	    		
				<% 
					GraphicsCardForm formForGraphicsCardData = (GraphicsCardForm) request.getAttribute("formForGraphicsCardData");
					
					if (formForGraphicsCardData != null)
					{
						if (!formForGraphicsCardData.isNoErrors())
						
						{	
						%>
							<div style='color:red'>Salvestuse läbiviimine ei õnnestunud!</div>
						<%
						}
					}
						
				%>
				
				
				<form action='s?action=save' method=POST>
					<input type='hidden' name='graphicscard_id' value='<%=formForGraphicsCardData.getGraphicscard_id() %>'>
					<input type='hidden' name='graphicsCardToSaveExists' value='true'/>
					<table>
						<tr><td colspan=3 bgcolor=#CCCCCC>KIRJE</td></tr>
						<tr><td>Toote identifikaator:</td><td colspan=2><%=formForGraphicsCardData.getGraphicscard_id() %></td></tr>
						<tr><td>Toote nimetus:</td><td><input type='text' name='product_name' value='<%=formForGraphicsCardData.getProduct_name() %>'></td><td><%=formForGraphicsCardData.getErrorByField("product_name")%></td></tr>
						<tr><td>CUDA protsessorite arv:</td><td><input type='text' name='cudacores' value='<%=formForGraphicsCardData.getCudacores() %>'></td><td><%=formForGraphicsCardData.getErrorByField("cudacores")%></td></tr>
						<tr><td>Kirjeldus:</td><td><textarea class='inputTextArea' name='overview'><%=formForGraphicsCardData.getOverview() %></textarea></td><td><%=formForGraphicsCardData.getErrorByField("overview")%></td></tr>
						<tr><td colspan=2><input type=submit value="SALVESTA"></td></tr>
					</table>
				</form>
	    	</div>
<!-- _____________________________CONTENT END____________________________________________________________________________ -->
	    	
	    	<%@ include file="/FooterAndEndOfContainer.jsp" %>
	</body>
</html>
